<%--
  Created by IntelliJ IDEA.
  User: lenovo
  Date: 2024/9/18
  Time: 下午2:55
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ page import="com.clz.Dao.*" %>
<%@ page import="com.clz.util.*" %>
<%@ page import="com.clz.entiy.*" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<form action="/PageServlet" method="post">
    <input type="text" size="30" name="keyword" placeholder="请输入搜索关键字">
    <input type="submit" value="搜索">
</form>
<a href="addUser.html">增加用户</a>
<table border="1px">
    <tr>
        <th>编号</th>
        <th>姓名</th>
        <th>操作</th>
    </tr>

    <c:forEach items="${list}" var="u">
        <tr>     <!-- el表达式 -->
            <td>${u.userId}</td>
            <td><a href="showUser?userId=${u.userId}">${u.userName}</a> </td>
            <td>
                <a href="">修改</a>
                <a href="PageDelete?userId=${u.userId}">删除</a>
            </td>
        </tr>
    </c:forEach>

    <tr>
        <td colspan="3">
            <a href="PageServlet?pageIndex=1">首页</a>
            <a href="PageServlet?keyword=${keyword}&pageIndex=${pageIndex-1}">上一页</a>
            <a href="PageServlet?keyword=${keyword}&pageIndex=${pageIndex+1}">下一页</a>
            <a href="PageServlet?pageIndex=${totalPages}">最后一页</a>
        </td>
    </tr>

</table>


</body>
</html>
